package com.sanji.register.repository;

import com.sanji.register.model.User;
import org.springframework.data.jpa.repository.JpaRepository;
import org.springframework.stereotype.Repository;

/**
 * @author 杨其才 [wzslw@163.com]
 * @since 17-4-22 下午12:00
 */

@Repository
public interface UserRepository extends JpaRepository<User, String> {

	/**
	 * 查询该手机号是否被注册
	 *
	 * @param phone
	 * @return
	 */
	Integer countByPhone(String phone);

	/**
	 * 查询该用户名是否被注册
	 *
	 * @param name
	 * @return
	 */
	Integer countByName(String name);
}